/**
 * 
 */
package nl.boektrust.btsoep.shared.model;

import java.io.Serializable;


/**
 * @author rao3
 *
 */
public class ContentSpecifier implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -2325192240877981574L;
	private int code;
	private ContentSpecifierType contentSpecifierType;
	private String description;
	/**
	 * @param code
	 * @param contentSpecifierType
	 * @param description
	 */
	public ContentSpecifier(int code,
			ContentSpecifierType contentSpecifierType, String description) {
		super();
		this.code = code;
		this.contentSpecifierType = contentSpecifierType;
		this.description = description;
	}
	
	public ContentSpecifier() {
		this(0, ContentSpecifierType.UNDEFINED,  "");
	}
	/**
	 * @return the code
	 */
	public int getCode() {
		return code;
	}
	/**
	 * @param code the code to set
	 */
	public void setCode(int code) {
		this.code = code;
	}
	/**
	 * @return the contentSpecifierType
	 */
	public ContentSpecifierType getContentSpecifierType() {
		return contentSpecifierType;
	}
	/**
	 * @param contentSpecifierType the contentSpecifierType to set
	 */
	public void setContentSpecifierType(ContentSpecifierType contentSpecifierType) {
		this.contentSpecifierType = contentSpecifierType;
	}
	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}
	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}
	
	public String toPrintString() {
		String string = "";
		string = string + "   type:        " + ContentSpecifierType.stringValue(this.contentSpecifierType) + "\n";
		if (this.description != null) {
			string = string + "   description:        " + this.description + "\n";
		}
		string = string + "   code:        " + this.code + "\n";
		return string;
	}
}
